package io.fredia.common.enums;

/**
 * 登录客户端
 * @author : fredia
 * @since : 2017年11月2日
 * @version : v0.0.1
 */
public enum LoginClient implements IEnum {
    PC(1, "PC"),
    IOS(2, "IOS"),
    ANDROID(3,"ANDROID"),
    WECHAT(4, "WECHAT"),
    OTHER(5, "OTHER");

    private int value;
    private String description;

    LoginClient(int value, String description) {
        this.value = value;
        this.description = description;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public String getDescription() {
        return description;
    }

    public static LoginClient valueOf(int value) {
        for (LoginClient item : LoginClient.values()) {
            if (item.getValue() == value) {
                return item;
            }
        }
        return null;
    }
}
